﻿using System.IO;
using System.Threading.Tasks;

namespace AutoTest.Business.IServices.Common
{
    /// <summary>
    /// 文件服务
    /// </summary>
    public interface IFileService 
    {
        /// <summary>
        /// 保存base64编码到了目录
        /// </summary>
        /// <param name="fileName">文件名</param>
        /// <param name="strBase64">base64编码</param>
        /// <param name="target">base64编码</param>
        /// <returns></returns>
        Task<string> SaveFileToServer(string fileName, string strBase64, string target);

        /// <summary>
        /// 保存图片，使用文件流
        /// </summary>
        /// <param name="fileName"></param>
        /// <param name="stream"></param>
        /// <param name="target"></param>
        /// <returns></returns>
        Task<string> SaveFileStream(string fileName, Stream stream, string target);
    }
}
